package pacBioSimple;

import java.util.concurrent.Callable;

public class ThreadAlignment implements Callable<Double> {
	private String a,template;
	private int gap,ex;
	public ThreadAlignment(String a, String template, int gap, int ex)
	{
		this.a=a;
		this.template=template;
		this.gap=gap;
		this.ex=ex;
	}
	
	public Double doAlignment()
	{
		if(a.equals(""))
			return 0.0;
		
		double  alignment_result = new NeedlemanWunsch(a,template, gap, ex).affineCompare();
		return alignment_result;
	}
	
	
	@Override
	public Double call() throws Exception
	{
		if(a.equals(""))
			return 0.0;
		
		double  alignment_result = new NeedlemanWunsch(a,template, gap, ex).affineCompare();
		return alignment_result;
	}

}
